//
//  BaseHttpClient.h
//  OAProject
//
//  Created by yhj on 2017/2/21.
//  Copyright © 2017年 cdnunion. All rights reserved.
//

#import "AFHTTPSessionManager.h"

@interface BaseHttpClient : AFHTTPSessionManager

/**
 *  发起网络请求
 *
 *  @param path       请求接口URI
 *  @param method     请求类型(GET/POST)
 *  @param parameters API参数字典
 *  @param success    成功block
 *  @param failure    失败block
 */
- (void)requestPath:(NSString *)path
             method:(NSString *)method
         parameters:(NSDictionary *)parameters
            success:(void (^)(NSURLSessionDataTask *operation, id responseObject))success
            failure:(void (^)(NSURLSessionDataTask *operation, NSError *error))failure;

/**
 *  发起网络请求(带二进制数据)
 *
 *  @param path             请求接口URI
 *  @param method           请求类型(GET/POST)
 *  @param parameters       API参数字典
 *  @param dataParameters    Data参数字典
 *  @param success           成功block
 *  @param failure           失败block
 */
- (void)requestPath:(NSString *)path
//             method:(NSString *)method
         parameters:(NSDictionary *)parameters
     dataParameters:(NSDictionary *)dataParameters
            success:(void (^)(NSURLSessionDataTask *operation, id responseObject))success
            failure:(void (^)(NSURLSessionDataTask *operation, NSError *error))failure;

@end
